package com.qjz.diancan.mapper;

import com.qjz.diancan.model.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper {
    @Select("SELECT * FROM user WHERE username = #{username}")
    User selectUserInfoByUserName(String username);

    @Insert("INSERT INTO user(username, password, phone, avatar,identity, create_time) VALUES (#{username}, #{password}, #{phone},  #{avatar},0, now())")
    void register(User user);
}
